﻿@using Orchard.DisplayManagement
@using Orchard.Layers.Models

@{ 
    ContentItem widget = Model.Widget;
    bool rendertitle = widget.Content.LayerMetadata.RenderTitle;
}

<section>
    @if (rendertitle)
    {
        var widgetTitle = Factory.Create("Widget_Title", new { Widget = widget });
        widgetTitle.Metadata.Alternates.Add("Widget_Title__" + widget.ContentType);

        @await DisplayAsync(widgetTitle)
    }

    @await DisplayAsync(Model.Content)
</section>
